package com.ruoyi.OutboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.OutboundManagement.mapper.PickingOutboundMapper;
import com.ruoyi.OutboundManagement.domain.PickingOutbound;
import com.ruoyi.OutboundManagement.service.IPickingOutboundService;

/**
 * 领料出库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-04
 */
@Service
public class PickingOutboundServiceImpl implements IPickingOutboundService 
{
    @Autowired
    private PickingOutboundMapper pickingOutboundMapper;

    /**
     * 查询领料出库管理
     * 
     * @param pickingId 领料出库管理主键
     * @return 领料出库管理
     */
    @Override
    public PickingOutbound selectPickingOutboundByPickingId(Long pickingId)
    {
        return pickingOutboundMapper.selectPickingOutboundByPickingId(pickingId);
    }

    /**
     * 查询领料出库管理列表
     * 
     * @param pickingOutbound 领料出库管理
     * @return 领料出库管理
     */
    @Override
    public List<PickingOutbound> selectPickingOutboundList(PickingOutbound pickingOutbound)
    {
        return pickingOutboundMapper.selectPickingOutboundList(pickingOutbound);
    }

    /**
     * 新增领料出库管理
     * 
     * @param pickingOutbound 领料出库管理
     * @return 结果
     */
    @Override
    public int insertPickingOutbound(PickingOutbound pickingOutbound)
    {
        pickingOutbound.setCreatedAt(new Date());
        return pickingOutboundMapper.insertPickingOutbound(pickingOutbound);
    }

    /**
     * 修改领料出库管理
     * 
     * @param pickingOutbound 领料出库管理
     * @return 结果
     */
    @Override
    public int updatePickingOutbound(PickingOutbound pickingOutbound)
    {
        return pickingOutboundMapper.updatePickingOutbound(pickingOutbound);
    }

    /**
     * 批量删除领料出库管理
     * 
     * @param pickingIds 需要删除的领料出库管理主键
     * @return 结果
     */
    @Override
    public int deletePickingOutboundByPickingIds(Long[] pickingIds)
    {
        return pickingOutboundMapper.deletePickingOutboundByPickingIds(pickingIds);
    }

    /**
     * 删除领料出库管理信息
     * 
     * @param pickingId 领料出库管理主键
     * @return 结果
     */
    @Override
    public int deletePickingOutboundByPickingId(Long pickingId)
    {
        return pickingOutboundMapper.deletePickingOutboundByPickingId(pickingId);
    }
}
